import React from 'react'
import {useRoutes} from 'react-router-dom'
import routes from '@/router'
// import '~antd/dist/antd.css'
import AppHeader from '@/components/appHeader/appHeader'
import AppFooter from '@/components/appFooter/appFooter'

function App() {
  return (
    <div className="App">
      <AppHeader/>
      {/* 设置路由懒加载之后,跳转页面时,路由没加载,显示loading*/}
      <React.Suspense fallback="loading">
        <div className="main">{useRoutes(routes)}</div>
      </React.Suspense>
      <AppFooter/>
    </div>
  )
}

export default App
